<?php
namespace app\admin\model;
use think\Db;
use think\Model;

class UserModel extends Model
{
	 public function __construct()
    {
        parent::__construct();

    }
    public function getUserList($start,$limit,$where=array()){
    	return Db::name('user')->where($where)->limit($start,$limit)->order('uid desc')->select();
    }

    public function searchUser($map,$field='*',$flag=true)
    {
        return $flag ? Db::name('user')->where($map)->field($field)->select()
            : Db::name('user')->where($map)->column($field);
    }
}
